import request from '@/utils/request'

// 查询隐患类别列表
export function listDanger(query) {
  return request({
    url: '/system/danger/list',
    method: 'get',
    params: query
  })
}

// 查询隐患类别详细
export function getDanger(id) {
  return request({
    url: '/system/danger/' + id,
    method: 'get'
  })
}

// 新增隐患类别
export function addDanger(data) {
  return request({
    url: '/system/danger',
    method: 'post',
    data: data
  })
}

// 修改隐患类别
export function updateDanger(data) {
  return request({
    url: '/system/danger',
    method: 'put',
    data: data
  })
}

// 删除隐患类别
export function delDanger(id) {
  return request({
    url: '/system/danger/' + id,
    method: 'delete'
  })
}
